Skip to content

Instantly share code, notes, and snippets.

@samsch
samsch / stop-using-jwts.md
Last active August 16, 2026 12:46
Stop using JWTs

Stop using JWTs!

TLDR: JWTs should not be used for keeping your user logged in. They are not designed for this purpose, they are not secure, and there is a much better tool which is designed for it: regular cookie sessions.

If you've got a bit of time to watch a presentation on it, I highly recommend this talk: https://www.youtube.com/watch?v=pYeekwv3vC4 (Note that other topics are largely skimmed over, such as CSRF protection. You should learn about other topics from other sources. Also note that "valid" usecases for JWTs at the end of the video can also be easily handled by other, better, and more secure tools. Specifically, PASETO.)

A related topic: Don't use localStorage (or sessionStorage) for authentication credentials, including JWT tokens: https://www.rdegges.com/2018/please-stop-using-local-storage/

The reason to avoid JWTs comes down to a couple different points:

  • The JWT specification is specifically designed only for very short-live tokens (~5 minute or less). Sessions

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@aarondfrancis
aarondfrancis / audit-your-codebase.md
Created August 14, 2026 15:20
A read-only, agent-orchestrated codebase audit prompt for data structures, state modeling, algorithms, and ownership.

Audit this entire codebase for materially useful simplifications in its data structures, state representation, control flow, algorithms, and ownership.

This is an audit-only exercise. Do not edit files, run tests, implement recommendations, commit, or push. Read-only inspection commands are allowed.

You are the coordinator. Continue until the complete codebase has been reviewed and the final audit is validated.

  1. Establish the coverage contract

Inspect the repository and inventory every identifiable subsystem.

@shiwildy
shiwildy / sources.list
Created August 26, 2025 10:24
Debian 13 Trixie complete sources.list
deb https://deb.debian.org/debian/ trixie contrib main non-free non-free-firmware
# deb-src https://deb.debian.org/debian/ trixie contrib main non-free non-free-firmware
deb https://deb.debian.org/debian/ trixie-updates contrib main non-free non-free-firmware
# deb-src https://deb.debian.org/debian/ trixie-updates contrib main non-free non-free-firmware
deb https://deb.debian.org/debian/ trixie-proposed-updates contrib main non-free non-free-firmware
# deb-src https://deb.debian.org/debian/ trixie-proposed-updates contrib main non-free non-free-firmware
deb https://deb.debian.org/debian/ trixie-backports contrib main non-free non-free-firmware
@warrenday
warrenday / gist:07abe3bbf147720345846f195834fc0b
Created August 13, 2026 11:07
12 Rules for Claude.md (Example)
# CLAUDE.md
Trailmark — an iOS app for logging hikes, backed by a Node.js REST API.
- `ios/` — SwiftUI app, iOS 17+, native components only
- `api/` — Node 22, TypeScript, Express, Postgres 16 (Kysely)
- `packages/contracts/` — zod schemas + generated OpenAPI. Single source of truth for both sides. Change the contract first, then the server, then the client.
Nested rules live in `api/CLAUDE.md` and `ios/CLAUDE.md`. Longer workflows (release, migration, security review) are skills in `.claude/skills/` — do not paste them here.
@byteab
byteab / BurningPhotoCard.tsx
Created August 3, 2026 16:27
Realistic burning paper effect. built with react-native
/**
* <BurningPhotoCard /> — a photo card printed on a sheet of paper that catches
* fire and burns away when you press Delete.
*
* Everything is in this one file: the WGSL shaders, the WebGPU burn simulation,
* the procedural paper grain, the Skia rasterizer that prints the card, and the
* React component. Drop it in your project and import it.
*
* ---------------------------------------------------------------------------
* INSTALL
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active August 16, 2026 12:41
Complete Recent Discord Quest

Caution

As of April 7th 2026, Discord has expressed their intent to crack down on automating quest completion.

Some users have received the following system message:

image

There isn't much I can do to make the script undetected, so use it at your own risk, as you most likely WILL get flagged by doing so.

Complete Recent Discord Quest